import vue from 'vue';
import createRouter from 'vue-router'//引入创建路由组件
import routerLoding from './routerLoding.js'

vue.use(createRouter);
const routes = [
  {
    path:'/',
    name:'lado',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/Login/lado.vue'),
    meta: {
      keepAlive: false,
      title: '正在进入...'
    },
  },
  {
    // 加载...
    path: '/lado',
    name: 'lado',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/Login/lado.vue'),
    meta: {
      keepAlive: false,
      title: '正在进入...'
    },
  },
  {
    // 开始页面
    path: '/start',
    name: 'start',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/Login/index.vue'),
    meta: {
      keepAlive: false,
      title: '开始'
    },
  },
  {
    // 首页
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/home/index.vue'),
    meta: {
      keepAlive: false,
      title: '古玩行'
    },
  },
  {
    // 我的
    path: '/mine',
    name: 'mine',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/user/mine.vue'),
    meta: {
      keepAlive: false,
      title: '我的'
    },
  },
  {
    // 消息
    path: '/news',
    name: 'news',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/user/news.vue'),
    meta: {
      keepAlive: false,
      title: '消息'
    },
  },
  {
    // 列表
    path: '/list',
    name: 'list',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/product/list.vue'),
    meta: {
      keepAlive: false,
      title: '商品详情'
    },
  },
  {
    // 销售
    path: '/sales',
    name: 'sales',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/user/sales.vue'),
    meta: {
      keepAlive: false,
      title: '销售额'
    },
  },
  {
    // 售出列表
    path: '/sold',
    name: 'sold',
    component: () => import(/* webpackChunkName: "disuse" */ '../views/user/Sold.vue'),
    meta: {
      keepAlive: false,
      title: '售出'
    },
  },
  {
    // 错误页面
    path: '/404',
    name: '404',
    component: () => import(/* webpackChunkName: "disuse" */ '../noPass.vue'),
    meta: {
      keepAlive: false,
      title: '页面错误'
    },
  },
]

const router = new createRouter({
  routes
})
routerLoding(router)

export default router